import java.lang.Math;
import java.util.Scanner;
public class Test {
    //1到100中含有9的数总共有多少个
    /*public static void main(String[] args) {
        int count=0;
        for (int i = 0; i < 100; i++) {
            if(i%10==9){
                count++;
            }
            if(i/10==9){
                count++;
            }
        }
        System.out.println(count);
    }*/

    //素数（只能被1和本身除）
    /*public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int i=scanner.nextInt();
        int n=2;
        for (n=2; n < i; n++) {
            if(i%n==0){
                break;
            }
        }
        if(n==i){
            System.out.println(i+"是素数");
        }
        else{
            System.out.println(i+"不是素数");
        }
    }*/
     //水仙花数
    /*public static void main(String[] args) {=
        for (int i = 100; i < 1000; i++) {
            int n1=i%10;
            int n2=(i/10)%10;
            int n3=i/100;
            if(i==(n1*n1*n1)+(n2*n2*n2)+(n3*n3*n3)){
                System.out.println(i+"");
            }
        }
        System.out.println();
    }*/

    //计算1-1/2+1/3-1/4......
    /*public static void main(String[] args) {
        double sum=0;
        int i=0;
        int flag=1;
        for (i = 1; i <=100; i++) {
            sum+=1.0/i*flag;
            flag=-flag;
        }
        System.out.println(sum);
    }*/

    //求最大公约数
    /*public static void main(String[] args) {

        Scanner scanner=new Scanner(System.in);
        int i=scanner.nextInt();
        Scanner sc=new Scanner(System.in);
        int j=sc.nextInt();
        int n=1;
        for (int k = 2; k <=i&&k<=j; k++) {
            if(i%k==0&&j%k==0){
                n=k;
            }
        }
        System.out.println("最大公约数为"+n);
    }*/
    public static void main(String[] args) {
        int count=0;
        Scanner scanner=new Scanner(System.in);
        int i= scanner.nextInt();
        for (int j = 0; j < 32; j++) {
            if(((i>>j)&1)==1){
                count++;
            }
        }
        System.out.println("在内存中储存时二进制1的个数为"+count);
    }
}


